package org.xdq.demo.controller;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class EmpController {

    private static final Logger log = LoggerFactory.getLogger(EmpController.class);

    @RequestMapping("/emplist")
    public String empList(Model model){
        log.info("这是Git测试！");
        model.addAttribute("info","大家好！");
        return "/emp-list.jsp";//向jsp转发
    }

    @RequestMapping("/test")
    public String test(Model model){
        log.info("这也是Git测试！");
        model.addAttribute("msg","测试信息！");
        return "redirect:/test.jsp";//向jsp转发
    }

}
